package com.blockmeta.bbs.baselibrary.widget.popupview;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;

import razerdp.basepopup.BasePopupWindow;

/**
 * Created by author on 2018/5/25.
 */

public  abstract class BaseBottomPopupWindow extends BasePopupWindow {
    public View popupView;
    public BaseBottomPopupWindow(Context context) {
        super(context);
        bindEvent();
    }




    @Override
    protected Animation initShowAnimation() {
        return getTranslateVerticalAnimation(1f, 0, 500);
    }

    @Override
    protected Animation initExitAnimation() {
        return getTranslateVerticalAnimation(0, 1f, 500);
    }



    @Override
    public View onCreatePopupView() {
        popupView = LayoutInflater.from(getContext()).inflate(getResId(), null);
        return popupView;
    }

    public  abstract int getResId();

    protected abstract void bindEvent();

}
